cmake_minimum_required(VERSION 3.5.0)

set(CMAKE_CXX_STANDARD 17)

set(lib faker_render)

set(libs 
    mesh 
    material
)
set(components
    mesh_box
    material_simpleColor
)


foreach(lib IN LISTS libs)
    add_subdirectory(${lib})
endforeach()

set(path_name faker_render )

add_library(${path_name}_engine 
    Editor.cpp 
    Serializer.cpp
    System.cpp
    )

add_library(
    ${path_name}_launcher
    Serializer.cpp
    System.cpp
    
)

find_package(ogl-gut)
find_package(ogl-math)
find_package(ogl-imgui)

foreach(lib IN LISTS components)
    target_link_libraries(${path_name}_engine PUBLIC ${path_name}_${lib}_engine)
    target_link_libraries(${path_name}_launcher PUBLIC ${path_name}_${lib}_launcher)
endforeach()

target_link_libraries(${path_name}_launcher PUBLIC ogl-gut ogl-math faker_basic_launcher)
target_link_libraries(${path_name}_engine PUBLIC ogl-gut ogl-math ogl-imgui faker_basic_engine)
